home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
United Public Domain Gold 2
/
United Public Domain Gold 2.iso
/
education
/
pe017.dms
/
pe017.adf
/
autoexec.Bak
/
autoexec.amosSourceCode
next >
Wrap
AMOS Source Code
|
1978-01-05
|
8KB
|
315 lines
EARL:
Bob Off
Auto View Off
Shared KEY,GAME
Global KEY,GAME
If GAME<1 Then SCR
ZO
If GAME<1 Then Double Buffer
'cages
Bob 5,204,86,14
Bob 6,152,86,14
Bob 7,257,86,14
'cage lids
Bob 8,262,64,16
Bob 9,209,64,16
Bob 10,155,64,16
KEY=0
CAGE1
CAGE2
CAGE3
MARK:
BEAR
SUM
Rem change key numbers to change amount of shots needed to get key
If KEY>3 Then Amal Off 4
If KEY>6 Then Amal Off 3
If KEY>9 Then Amal Off 5
If KEY=3 Then FIRST : BEAR : SUM
If KEY=6 Then SECOND : BEAR : SUM
If KEY=9 Then THIRD : FINALSCENARIO : Goto EARL
AWAY
Goto MARK
Procedure BEAR
Channel 1 To Bob 15
Bob 15,-70,140,1
M$="Anim 3,(1,4)(2,4)(3,4)(4,4)(5,4)(6,4)(5,4)(4,4)(3,4)(2,4);"
M$=M$+"Move 250,0,100 ; "
M$=M$+"Anim 1,($8001,4)($8002,4)($8003,4)($8004,4)($8005,4)($8006,4)($8005,4)($8004,4)($8003,4)($8002,4);"
M$=M$+"Move -40,0,20;M 0,-40,10"
Amal 1,M$
Amal On 1
Wait 150
Amal Off 1
Bob 15,140,100,($8004)
End Proc
Procedure AWAY
Channel 2 To Bob 15
Bob 15,140,100,$8001
M$="Anim 4,(1,4)(2,4)(3,4)(4,4)(5,4)(6,4)(5,4)(4,4)(3,4)(2,4);"
M$=M$+"Move 40,40,100 ;"
M$=M$+"Anim 5,($8001,4)($8002,4)($8003,4)($8004,4)($8005,4)($8006,4)($8005,4)($8004,4)($8003,4)($8002,4);"
M$=M$+" Move -250,0,80"
Amal 2,M$
Amal On 2
Wait 180
Amal Off 2
End Proc
Procedure SUM
ZX:
A=Rnd(10) : B=Rnd(8)
MA=Max(A,B) : MI=Min(A,B)
A=MA : B=MI
If A+B>12 or A+B<1 Then Goto ZX
A$=Str$(A) : B$=Str$(B)
Ink 15,14, : Text 33,80,A$ : Text 74,80,B$
Do
C=Mouse Zone
If Mouse Click=1 and C>0 and C<13 Then Exit
Loop
C$=Str$(C)
Ink ,12, : Text 62,113,C$
If A+B=C : Bell : Inc KEY : Else Shoot : End If
Wait 100
Ink 12,, : Text 62,113,C$
Ink 14,14, : Text 33,80,A$ : Text 74,80,B$
End Proc
Procedure SCR
Screen Open 1,320,250,16,Lowres
Screen Open 0,320,250,16,Lowres
Load "care.bears:sprites/funshine.abk"
Curs Off : Flash Off : Hide
Load "mus"
Load Iff "iff/caretitle.iff",0
Load Iff "care.bears:iff/bear.iff",1
Get Disc Fonts : Set Font 4 : Set Text 0
Screen Display 0,128,45,,
Get Sprite Palette
Music 1
Tempo 9
Repeat : Until Mouse Key=1
Screen Display 1,128,45,,
View
End Proc
Procedure ZO
Reserve Zone 12
L=27
Locate 1,L : Print Zone$(Border$("1",2),1)
Locate 4,L : Print Zone$(Border$("2",2),2)
Locate 7,L : Print Zone$(Border$("3",2),3)
Locate 10,L : Print Zone$(Border$("4",2),4)
Locate 13,L : Print Zone$(Border$("5",2),5)
Locate 16,L : Print Zone$(Border$("6",2),6)
Locate 19,L : Print Zone$(Border$("7",2),7)
Locate 22,L : Print Zone$(Border$("8",2),8)
Locate 25,L : Print Zone$(Border$("9",2),9)
Locate 28,L : Print Zone$(Border$("10",2),10)
Locate 32,L : Print Zone$(Border$("11",2),11)
Locate 36,L : Print Zone$(Border$("12",2),12)
Limit Mouse 130,253 To 435,274
Show
End Proc
Procedure CAGE1
Channel 4 To Bob 3
Bob 3,180,88,11
M$=M$+"B:Move 10,3,20 ; Move -10,-3,30;Jump B"
Amal 4,M$
Amal On 4
End Proc
Procedure CAGE2
Channel 3 To Bob 2
Bob 2,230,100,10
M$=M$+"C:Move 10,3,30 ; Move -10,-3,20;Jump C"
Amal 3,M$
Amal On 3
End Proc
Procedure CAGE3
Channel 5 To Bob 4
Bob 4,286,88,11
M$="D:Move 10,-3,30 ;M-10,3,20;Jump D "
Amal 5,M$
Amal On 5
End Proc
Procedure FIRST
For Y=126 To 130
Bob 11,45,Y,7
Wait 5
Next Y
Rem gets key and opens first cage
Channel 6 To Bob 15
Bob 15,140,100,$8001
M$="Anim 2,($8001,4)($8002,4)($8003,4)($8004,4)($8005,4)($8006,4)($8005,4)($8004,4)($8003,4)($8002,4);"
M$=M$+"Move 0,-20,20;M -90,0,30"
M$=M$+"Anim 3,(1,4)(2,4)(3,4)(4,4)(5,4)(6,4)(5,4)(4,4)(3,4)(2,4);"
M$=M$+"Move 130,0,100 ; M 0,-20,20"
Amal 6,M$
Amal On 6
Do
If X Bob(15)<70 Then Bob Off 11 : Exit
Loop
Wait 200
' lock open
Bob 12,194,81,15
'lid open
Bob Off 10
Bob 1,156,64,17
Rem bear goes away
Channel 7 To Bob 15
Bob 15,140,100,1
M$=""
M$="Anim 3,(1,6)(2,6)(3,6)(4,6)(5,6)(6,6)(5,6)(4,6)(3,6)(2,6);"
M$=M$+"Move 0,50,50;M 230,0,150"
Amal 7,M$
Amal On 7
Wait 150
Rem star comes out of box
Channel 8 To Bob 3
Bob 3,180,88,12
M$=""
M$=M$+"Anim 0,(12,150)(13,25)"
M$=M$+"Move 1,-50,50;M -15,0,10"
M$=M$+"Star:Move 10,-5,20;M 10,5,20;M -10,-5,20;M -10,5,20;Jump Star"
Amal 8,M$
Amal On 8
Wait 150
End Proc
Procedure SECOND
For Y=126 To 130 Step 2
Bob 11,45,Y,7
Wait 5
Next Y
Rem gets key and opens second cage
Channel 9 To Bob 15
Bob 15,140,100,$8001
M$="Anim 2,($8001,4)($8002,4)($8003,4)($8004,4)($8005,4)($8006,4)($8005,4)($8004,4)($8003,4)($8002,4);"
M$=M$+"Move 0,-20,20;M -90,0,30"
M$=M$+"Anim 4,(1,4)(2,4)(3,4)(4,4)(5,4)(6,4)(5,4)(4,4)(3,4)(2,4);"
M$=M$+"Move 180,0,100 ; M 0,-20,20"
Amal 9,M$
Amal On 9
Do
If X Bob(15)<70 Then Bob Off 11 : Exit
Loop
Wait 200
' lock open
Bob 13,246,81,15
'lid open
Bob 5,208,66,17
Rem NEW CAGE ,I got bob priorities all wrong
Bob Off 9
Bob 10,204,86,14
Rem bear goes away
Channel 10 To Bob 15
Bob 15,230,60,1
M$=""
M$="Anim 3,(1,6)(2,6)(3,6)(4,6)(5,6)(6,6)(5,6)(4,6)(3,6)(2,6);"
M$=M$+"Move 0,50,30;M 230,0,120"
Amal 10,M$
Amal On 10
Wait 110
Rem heart comes out of box
Bob Off 2
Channel 11 To Bob 9
Bob 9,230,100,9
M$=""
M$=M$+"Move-5,-50,50;"
M$=M$+"Heart:Move 10,-5,20;M 10,5,20;M -10,-5,20;M -10,5,20;Jump Heart"
Amal 11,M$
Amal On 11
Wait 150
End Proc
Procedure THIRD
For Y=126 To 130 Step 2
Bob 11,45,Y,7
Wait 5
Next Y
Rem gets key and opens first cage
Channel 12 To Bob 15
Bob 15,140,100,$8001
M$="Anim 2,($8001,4)($8002,4)($8003,4)($8004,4)($8005,4)($8006,4)($8005,4)($8004,4)($8003,4)($8002,4);"
M$=M$+"Move 0,-20,20;M -90,0,30"
M$=M$+"Anim 4,(1,4)(2,4)(3,4)(4,4)(5,4)(6,4)(5,4)(4,4)(3,4)(2,4);"
M$=M$+"Move 240,0,140 ; M 0,-20,20"
Amal 12,M$
Amal On 12
Do
If X Bob(15)<70 Then Bob Off 11 : Exit
Loop
Wait 200
' lock open
Bob 14,298,81,15
Rem dont need 1st and 2nd bars now
Bob Off 10
Bob Off 6
Rem 3rd lid down goes bye,bye
Bob Off 8
' lid open
Bob 2,262,65,17
Rem bear goes away
Channel 13 To Bob 15
Bob 15,290,40,1
M$=""
M$="Anim 2,(1,6)(2,6)(3,6)(4,6)(5,6)(6,6)(5,6)(4,6)(3,6)(2,6);"
M$=M$+"Move 0,50,20;M 80,0,50"
Amal 13,M$
Amal On 13
Wait 80
Rem star comes out of box
Channel 14 To Bob 4
Bob 4,286,88,12
M$=""
M$=M$+"Anim 0,(12,150)(13,25)"
M$=M$+"Move 0,-50,50;"
M$=M$+"Star:Move 10,-5,20;M 10,5,20;M -10,-5,20;M -10,5,20;Jump Star"
Amal 14,M$
Amal On 14
Wait 150
End Proc
Procedure FINALSCENARIO
Bob Off 7
Rem star 1 goes away
Channel 4 To Bob 3
Bob 3,,,
Amal 4,"Move 0,90,50 ; Move -200,0,100 ; "
Amal On 4
Rem heart goes away
Channel 3 To Bob 9
Bob 9,,,
Amal 3,"Move 0,90,50 ; Move -280,0,140 ; "
Amal On 3
Rem star 2 goes away
Channel 5 To Bob 4
Bob 4,,,
Amal 5,"Move 0,90,50 ; Move -380,0,190 ; "
Amal On 5
Wait 300
Rem play again sequence
Screen Open 5,320,90,16,Lowres : Curs Off : Flash Off : Cls 0
Box 30,10 To 300,80 : Box 32,12 To 298,78
Cls 4,33,13 To 298,78
Paper 4
Locate 13,2 : Print "Well done."
Locate 13,3 : Print "Play again?"
Auto View On
Rem view
For Z=1 To 90
Screen Display 5,,,,Z
Wait 1
Next Z
Reserve Zone 2
Paper 11
Locate 10,6 : Print Zone$(Border$("Yes",2),1)
Locate 30,6 : Print Zone$(Border$("No",2),2)
Limit Mouse 157,60 To 425,130
Do
If Mouse Key=1 and Mouse Zone>0 Then MZ=Mouse Zone
If MZ=2 Then End
If MZ=1 Then Exit
Loop
For Z=90 To 1 Step -1
Screen Display 5,,,,Z
Wait 1
Next Z
Screen Close 5
GAME=1
End Proc